<template>
    <div class="myswiper">
        <!-- swiper结构 -->
        <div class="swiper-container"> 
            <div class="swiper-wrapper">
                <div class="swiper-slide"><img src="https://dummyimage.com/350x240/0f0" alt=""></div>
                <div class="swiper-slide"><img src="https://dummyimage.com/350x240/00f" alt=""></div>
                <div class="swiper-slide"><img src="https://dummyimage.com/350x240/0ff" alt=""></div>
            </div>
            <div class="swiper-pagination"></div>
        </div>
    </div>
</template>

<script>
import Swiper from 'swiper'
import 'swiper/css/swiper.css'

export default {
    data(){
        return {

        }
    },
    mounted(){
        /* 实例化 */
        new Swiper('.swiper-container',{
            autoplay:{
                delay:1000,
                disableOnInteraction: false
            },
            loop:true,
            pagination:{
                el:'.swiper-pagination'
            }
        })
    }
}
</script>
<style scoped>
.swiper-container{
    width: 100%;
    height: 240px;
}
.swiper-container img{
    width: 100%;
} 
</style>